home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0135_VESA point routine 640x480x16 Plot.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  1KB  |  43 lines

  1.  
  2. {
  3. > I don't see the need for Ystart.  Offset address =
  4. well, Ystart is needed basically because I'm using two pages, and depending
  5. on which page is visible at the time, ystart varies...
  6.  
  7. > (BytesPerScanLine * y)+x. Point_VESA should not XOR AX,AX after
  8. > @skip.  The AH contains the error return from $4f05 function.
  9. > AH=00h is success.
  10.  
  11. ok, but this doesn't solve my problem...  my problem is that I always get to
  12. 'see' the wrong colors - I don't mind which error codes there are :-))
  13.  
  14. > P.S.  Can you show me how to VESA PutPixel to 640x480x16 without using BGI?
  15. sure, but 640x480x16 still is a normal VGA and not a VESA mode:
  16. }
  17.  
  18. PROCEDURE plot_640x480x16; ASSEMBLER;
  19. ASM
  20.   MOV ES, SEGA000
  21.   MOV DI, px
  22.   MOV CX, DI
  23.   SHR DI, 3
  24.   MOV AX, py
  25.   SHL AX, 4
  26.   ADD DI, AX
  27.   SHL AX, 2
  28.   ADD DI, AX
  29.   AND CL, $07
  30.   MOV AH, $80
  31.   SHR AH, CL
  32.   MOV AL, $08
  33.   MOV DX, $03CE
  34.   OUT DX, AX
  35.   MOV AX, pc
  36.   MOV AH, [ES:DI]
  37.   MOV [ES:DI], AL
  38. END;
  39.  
  40. {
  41. this should work (as always: px,py are the coordinates and pc is the color
  42. (all global INTEGERs)
  43. }